home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Toolbox / Visual Basic Toolbox (P.I.E.)(1996).ISO / mail / mailx6 / _setup.1 / ocxma95.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1996-02-02  |  23.9 KB  |  735 lines

  1. VERSION 4.00
  2. Begin VB.Form OcxMainForm 
  3.    BorderStyle     =   3  'Fixed Dialog
  4.    Caption         =   "Mail eXtension Win95 DEMO OCX-32"
  5.    ClientHeight    =   5160
  6.    ClientLeft      =   1500
  7.    ClientTop       =   1560
  8.    ClientWidth     =   6615
  9.    Height          =   5535
  10.    Left            =   1455
  11.    LinkTopic       =   "Form1"
  12.    MaxButton       =   0   'False
  13.    MinButton       =   0   'False
  14.    ScaleHeight     =   5160
  15.    ScaleWidth      =   6615
  16.    Top             =   1230
  17.    Width           =   6705
  18.    Begin Mailx16Lib.MForm MForm1 
  19.       Left            =   1920
  20.       Top             =   4680
  21.       _Version        =   65541
  22.       _ExtentX        =   3413
  23.       _ExtentY        =   500
  24.       _StockProps     =   0
  25.       MXFormName      =   "FormTag1"
  26.    End
  27.    Begin Mailx16Lib.MSess MSess1 
  28.       Left            =   0
  29.       Top             =   4320
  30.       _Version        =   65541
  31.       _ExtentX        =   900
  32.       _ExtentY        =   900
  33.       _StockProps     =   0
  34.       Mail_Type       =   2
  35.       DisplayErrors   =   0   'False
  36.    End
  37.    Begin Threed.SSPanel SSPanel1 
  38.       Height          =   855
  39.       Left            =   0
  40.       TabIndex        =   1
  41.       Top             =   0
  42.       Width           =   6615
  43.       _Version        =   65536
  44.       _ExtentX        =   11668
  45.       _ExtentY        =   1508
  46.       _StockProps     =   15
  47.       BackColor       =   12632256
  48.       Outline         =   -1  'True
  49.       Begin ComctlLib.Toolbar Toolbar1 
  50.          Height          =   630
  51.          Left            =   120
  52.          Negotiate       =   -1  'True
  53.          TabIndex        =   2
  54.          Top             =   120
  55.          Width           =   6375
  56.          _Version        =   65536
  57.          _ExtentX        =   11245
  58.          _ExtentY        =   1111
  59.          _StockProps     =   96
  60.          ImageList       =   "ImageList1"
  61.          ButtonWidth     =   1032
  62.          ButtonHeight    =   1005
  63.          NumButtons      =   8
  64.          i1              =   "ocxma95.frx":0000
  65.          i2              =   "ocxma95.frx":01C7
  66.          i3              =   "ocxma95.frx":0366
  67.          i4              =   "ocxma95.frx":0521
  68.          i5              =   "ocxma95.frx":06C4
  69.          i6              =   "ocxma95.frx":086F
  70.          i7              =   "ocxma95.frx":0A16
  71.          i8              =   "ocxma95.frx":0BB5
  72.          AlignSet        =   -1  'True
  73.       End
  74.    End
  75.    Begin Mailx16Lib.MMsg MMsg1 
  76.       Left            =   0
  77.       Top             =   3720
  78.       _Version        =   65541
  79.       _ExtentX        =   900
  80.       _ExtentY        =   900
  81.       _StockProps     =   0
  82.       MarkAsRead      =   0   'False
  83.       DisplayErrors   =   0   'False
  84.       BindString      =   "MSess1"
  85.    End
  86.    Begin Mailx16Lib.MReci MReci1 
  87.       Left            =   5400
  88.       Top             =   4440
  89.       _Version        =   65541
  90.       _ExtentX        =   900
  91.       _ExtentY        =   900
  92.       _StockProps     =   0
  93.       DisplayErrors   =   0   'False
  94.       BindString      =   "MMsg2"
  95.    End
  96.    Begin Mailx16Lib.MFile MFile1 
  97.       Left            =   6000
  98.       Top             =   4440
  99.       _Version        =   65541
  100.       _ExtentX        =   900
  101.       _ExtentY        =   900
  102.       _StockProps     =   0
  103.       BindString      =   "MMsg2"
  104.    End
  105.    Begin Mailx16Lib.MMsg MMsg2 
  106.       Left            =   4800
  107.       Top             =   4440
  108.       _Version        =   65541
  109.       _ExtentX        =   900
  110.       _ExtentY        =   900
  111.       _StockProps     =   0
  112.       SuppressAttach  =   0   'False
  113.       DisplayErrors   =   0   'False
  114.       BindString      =   "MSess1"
  115.    End
  116.    Begin TabDlg.SSTab SSTab1 
  117.       Height          =   3735
  118.       Left            =   120
  119.       TabIndex        =   3
  120.       Top             =   960
  121.       Width           =   6375
  122.       _Version        =   65536
  123.       _ExtentX        =   11245
  124.       _ExtentY        =   6588
  125.       _StockProps     =   15
  126.       Caption         =   "Recipients"
  127.       TabsPerRow      =   4
  128.       Tab             =   1
  129.       TabOrientation  =   0
  130.       Tabs            =   4
  131.       Style           =   1
  132.       TabMaxWidth     =   0
  133.       TabHeight       =   529
  134.       TabCaption(0)   =   "Container Messages"
  135.       Tab(0).ControlCount=   4
  136.       Tab(0).ControlEnabled=   0   'False
  137.       Tab(0).Control(0)=   "SSPanel2"
  138.       Tab(0).Control(1)=   "TreeView1"
  139.       Tab(0).Control(2)=   "nInbox"
  140.       Tab(0).Control(3)=   "Label2"
  141.       TabCaption(1)   =   "Recipients"
  142.       Tab(1).ControlCount=   7
  143.       Tab(1).ControlEnabled=   -1  'True
  144.       Tab(1).Control(0)=   "Label4"
  145.       Tab(1).Control(1)=   "Label5"
  146.       Tab(1).Control(2)=   "SSCommand2"
  147.       Tab(1).Control(3)=   "SSCommand3"
  148.       Tab(1).Control(4)=   "SSCommand4"
  149.       Tab(1).Control(5)=   "ListView3"
  150.       Tab(1).Control(6)=   "szResolve"
  151.       TabCaption(2)   =   "File Attachments"
  152.       Tab(2).ControlCount=   3
  153.       Tab(2).ControlEnabled=   0   'False
  154.       Tab(2).Control(0)=   "szFiles"
  155.       Tab(2).Control(1)=   "Label6"
  156.       Tab(2).Control(2)=   "ListView2"
  157.       TabCaption(3)   =   "Message"
  158.       Tab(3).ControlCount=   10
  159.       Tab(3).ControlEnabled=   0   'False
  160.       Tab(3).Control(0)=   "szFrom"
  161.       Tab(3).Control(1)=   "szTime"
  162.       Tab(3).Control(2)=   "szSubject"
  163.       Tab(3).Control(3)=   "Frame1"
  164.       Tab(3).Control(4)=   "Label7"
  165.       Tab(3).Control(5)=   "Label3"
  166.       Tab(3).Control(6)=   "SSCommand6"
  167.       Tab(3).Control(7)=   "SSCommand5"
  168.       Tab(3).Control(8)=   "Label1"
  169.       Tab(3).Control(9)=   "SSCommand1"
  170.       Begin VB.TextBox szFrom 
  171.          Height          =   285
  172.          Left            =   -74040
  173.          TabIndex        =   27
  174.          Top             =   1200
  175.          Width           =   3975
  176.       End
  177.       Begin VB.TextBox szTime 
  178.          Height          =   285
  179.          Left            =   -74040
  180.          TabIndex        =   26
  181.          Top             =   840
  182.          Width           =   3975
  183.       End
  184.       Begin VB.TextBox szSubject 
  185.          Height          =   285
  186.          Left            =   -74040
  187.          TabIndex        =   14
  188.          Top             =   480
  189.          Width           =   3975
  190.       End
  191.       Begin VB.TextBox szResolve 
  192.          Height          =   285
  193.          Left            =   1440
  194.          TabIndex        =   8
  195.          Top             =   480
  196.          Width           =   3375
  197.       End
  198.       Begin Threed.SSPanel SSPanel2 
  199.          Height          =   375
  200.          Left            =   -72480
  201.          TabIndex        =   20
  202.          Top             =   3210
  203.          Width           =   3735
  204.          _Version        =   65536
  205.          _ExtentX        =   6588
  206.          _ExtentY        =   661
  207.          _StockProps     =   15
  208.          BackColor       =   12632256
  209.          BevelOuter      =   1
  210.          Begin ComctlLib.ProgressBar ProgressBar1 
  211.             Height          =   270
  212.             Left            =   45
  213.             TabIndex        =   21
  214.             Top             =   45
  215.             Width           =   3645
  216.             _Version        =   65536
  217.             _ExtentX        =   6429
  218.             _ExtentY        =   476
  219.             _StockProps     =   192
  220.             Appearance      =   1
  221.          End
  222.       End
  223.       Begin VB.Frame Frame1 
  224.          Caption         =   "Note Part:"
  225.          Height          =   1815
  226.          Left            =   -74880
  227.          TabIndex        =   22
  228.          Top             =   1680
  229.          Width           =   4815
  230.          Begin RichtextLib.RichTextBox szNoteText 
  231.             Height          =   1455
  232.             Left            =   120
  233.             TabIndex        =   23
  234.             Top             =   240
  235.             Width           =   4575
  236.             _Version        =   65536
  237.             _ExtentX        =   8070
  238.             _ExtentY        =   2566
  239.             _StockProps     =   69
  240.             BackColor       =   -2147483643
  241.             TextRTF         =   $"ocxma95.frx":0D60
  242.             RightMargin     =   4555.17
  243.          End
  244.       End
  245.       Begin ComctlLib.TreeView TreeView1 
  246.          Height          =   2655
  247.          Left            =   -74880
  248.          TabIndex        =   29
  249.          Top             =   480
  250.          Width           =   6135
  251.          _Version        =   65536
  252.          _ExtentX        =   10821
  253.          _ExtentY        =   4683
  254.          _StockProps     =   196
  255.          Appearance      =   1
  256.          BorderStyle     =   1
  257.          HideSelection   =   0   'False
  258.          ImageList       =   "ImageList2"
  259.          Indentation     =   529
  260.          LabelEdit       =   1
  261.          LineStyle       =   1
  262.          PathSeparator   =   "\"
  263.          Sorted          =   -1  'True
  264.          Style           =   7
  265.       End
  266.       Begin ComctlLib.ListView ListView3 
  267.          Height          =   2415
  268.          Left            =   120
  269.          TabIndex        =   28
  270.          Top             =   1200
  271.          Width           =   4695
  272.          _Version        =   65536
  273.          _ExtentX        =   8281
  274.          _ExtentY        =   4260
  275.          _StockProps     =   205
  276.          ForeColor       =   -2147483640
  277.          BackColor       =   -2147483643
  278.          Appearance      =   1
  279.          BorderStyle     =   1
  280.          HideSelection   =   0   'False
  281.          Icons           =   "ImageList1"
  282.          LabelEdit       =   1
  283.          SmallIcons      =   ""
  284.       End
  285.       Begin VB.Label Label7 
  286.          Alignment       =   1  'Right Justify
  287.          Caption         =   "From:"
  288.          Height          =   255
  289.          Left            =   -74880
  290.          TabIndex        =   25
  291.          Top             =   1200
  292.          Width           =   700
  293.       End
  294.       Begin VB.Label Label3 
  295.          Alignment       =   1  'Right Justify
  296.          Caption         =   "Time:"
  297.          Height          =   255
  298.          Left            =   -74880
  299.          TabIndex        =   24
  300.          Top             =   840
  301.          Width           =   700
  302.       End
  303.       Begin Threed.SSCommand SSCommand6 
  304.          Height          =   855
  305.          Left            =   -69840
  306.          TabIndex        =   19
  307.          Top             =   1560
  308.          Width           =   1095
  309.          _Version        =   65536
  310.          _ExtentX        =   1931
  311.          _ExtentY        =   1508
  312.          _StockProps     =   78
  313.          Caption         =   "Forward"
  314.          Picture         =   "ocxma95.frx":0E43
  315.       End
  316.       Begin Threed.SSCommand SSCommand5 
  317.          Height          =   855
  318.          Left            =   -69840
  319.          TabIndex        =   18
  320.          Top             =   2640
  321.          Width           =   1095
  322.          _Version        =   65536
  323.          _ExtentX        =   1931
  324.          _ExtentY        =   1508
  325.          _StockProps     =   78
  326.          Caption         =   "New Msg"
  327.          Picture         =   "ocxma95.frx":1295
  328.       End
  329.       Begin VB.Label szFiles 
  330.          Caption         =   "0"
  331.          Height          =   255
  332.          Left            =   -73320
  333.          TabIndex        =   17
  334.          Top             =   3360
  335.          Width           =   1815
  336.       End
  337.       Begin VB.Label Label1 
  338.          Alignment       =   1  'Right Justify
  339.          Caption         =   "Subject:"
  340.          Height          =   255
  341.          Left            =   -74880
  342.          TabIndex        =   16
  343.          Top             =   480
  344.          Width           =   700
  345.       End
  346.       Begin Threed.SSCommand SSCommand1 
  347.          Height          =   855
  348.          Left            =   -69840
  349.          TabIndex        =   15
  350.          Top             =   480
  351.          Width           =   1095
  352.          _Version        =   65536
  353.          _ExtentX        =   1931
  354.          _ExtentY        =   1508
  355.          _StockProps     =   78
  356.          Caption         =   "Reply"
  357.          Font3D          =   3
  358.          Picture         =   "ocxma95.frx":16E7
  359.       End
  360.       Begin VB.Label Label6 
  361.          Caption         =   "Total Files included:"
  362.          Height          =   255
  363.          Left            =   -74880
  364.          TabIndex        =   13
  365.          Top             =   3360
  366.          Width           =   1455
  367.       End
  368.       Begin ComctlLib.ListView ListView2 
  369.          Height          =   2775
  370.          Left            =   -74880
  371.          TabIndex        =   12
  372.          Top             =   480
  373.          Width           =   6135
  374.          _Version        =   65536
  375.          _ExtentX        =   10821
  376.          _ExtentY        =   4895
  377.          _StockProps     =   205
  378.          ForeColor       =   -2147483640
  379.          BackColor       =   -2147483643
  380.          Appearance      =   1
  381.          BorderStyle     =   1
  382.          Icons           =   ""
  383.          LabelEdit       =   1
  384.          SmallIcons      =   ""
  385.          View            =   3
  386.          NumItems        =   3
  387.          i1              =   "ocxma95.frx":1B39
  388.          i2              =   "ocxma95.frx":1BE9
  389.          i3              =   "ocxma95.frx":1C97
  390.       End
  391.       Begin Threed.SSCommand SSCommand4 
  392.          Height          =   975
  393.          Left            =   4920
  394.          TabIndex        =   11
  395.          Top             =   1500
  396.          Width           =   1335
  397.          _Version        =   65536
  398.          _ExtentX        =   2355
  399.          _ExtentY        =   1720
  400.          _StockProps     =   78
  401.          Caption         =   "Add Recipients"
  402.          Picture         =   "ocxma95.frx":1D45
  403.       End
  404.       Begin Threed.SSCommand SSCommand3 
  405.          Height          =   975
  406.          Left            =   4920
  407.          TabIndex        =   10
  408.          Top             =   420
  409.          Width           =   1335
  410.          _Version        =   65536
  411.          _ExtentX        =   2355
  412.          _ExtentY        =   1720
  413.          _StockProps     =   78
  414.          Caption         =   "Resolve Names"
  415.          Picture         =   "ocxma95.frx":2197
  416.       End
  417.       Begin Threed.SSCommand SSCommand2 
  418.          Height          =   975
  419.          Left            =   4920
  420.          TabIndex        =   9
  421.          Top             =   2580
  422.          Width           =   1335
  423.          _Version        =   65536
  424.          _ExtentX        =   2355
  425.          _ExtentY        =   1720
  426.          _StockProps     =   78
  427.          Caption         =   "Address Book"
  428.          Picture         =   "ocxma95.frx":25E9
  429.       End
  430.       Begin VB.Label Label5 
  431.          Caption         =   "Resolve Names:"
  432.          Height          =   255
  433.          Left            =   120
  434.          TabIndex        =   7
  435.          Top             =   540
  436.          Width           =   1215
  437.       End
  438.       Begin VB.Label Label4 
  439.          Caption         =   "Current Recipient List:"
  440.          Height          =   255
  441.          Left            =   120
  442.          TabIndex        =   6
  443.          Top             =   900
  444.          Width           =   1695
  445.       End
  446.       Begin VB.Label nInbox 
  447.          Caption         =   "0"
  448.          Height          =   255
  449.          Left            =   -72960
  450.          TabIndex        =   5
  451.          Top             =   3360
  452.          Width           =   855
  453.       End
  454.       Begin VB.Label Label2 
  455.          Caption         =   "Total Inbox Messages:"
  456.          Height          =   255
  457.          Left            =   -74760
  458.          TabIndex        =   4
  459.          Top             =   3360
  460.          Width           =   1695
  461.       End
  462.    End
  463.    Begin ComctlLib.ImageList ImageList2 
  464.       Left            =   0
  465.       Top             =   840
  466.       _Version        =   65536
  467.       _ExtentX        =   1005
  468.       _ExtentY        =   1005
  469.       _StockProps     =   1
  470.       BackColor       =   -2147483643
  471.       ImageWidth      =   32
  472.       ImageHeight     =   32
  473.       NumImages       =   4
  474.       i1              =   "ocxma95.frx":2A3B
  475.       i2              =   "ocxma95.frx":2F32
  476.       i3              =   "ocxma95.frx":3429
  477.       i4              =   "ocxma95.frx":3920
  478.    End
  479.    Begin ComctlLib.ImageList ImageList1 
  480.       Left            =   6000
  481.       Top             =   840
  482.       _Version        =   65536
  483.       _ExtentX        =   1005
  484.       _ExtentY        =   1005
  485.       _StockProps     =   1
  486.       BackColor       =   -2147483643
  487.       ImageWidth      =   32
  488.       ImageHeight     =   32
  489.       NumImages       =   8
  490.       i1              =   "ocxma95.frx":3E17
  491.       i2              =   "ocxma95.frx":430E
  492.       i3              =   "ocxma95.frx":4805
  493.       i4              =   "ocxma95.frx":4CFC
  494.       i5              =   "ocxma95.frx":51F3
  495.       i6              =   "ocxma95.frx":56EA
  496.       i7              =   "ocxma95.frx":5BE1
  497.       i8              =   "ocxma95.frx":60D8
  498.    End
  499.    Begin ComctlLib.StatusBar StatusBar1 
  500.       Align           =   2  'Align Bottom
  501.       Height          =   300
  502.       Left            =   0
  503.       TabIndex        =   0
  504.       Top             =   4860
  505.       Width           =   6615
  506.       _Version        =   65536
  507.       _ExtentX        =   11668
  508.       _ExtentY        =   529
  509.       _StockProps     =   68
  510.       AlignSet        =   -1  'True
  511.       Style           =   1
  512.       SimpleText      =   "Mail eXtension Session CLOSED"
  513.       i1              =   "ocxma95.frx":65CF
  514.    End
  515. Attribute VB_Name = "OcxMainForm"
  516. Attribute VB_Creatable = False
  517. Attribute VB_Exposed = False
  518. Private Sub TabStrip1_Click()
  519. End Sub
  520. Private Sub RichTextBox1_Click()
  521. End Sub
  522. Private Sub ListView3_DblClick()
  523.     Dim ItemX As ListItem
  524.     On Error GoTo NoItem
  525.     Set ItemX = ListView3.SelectedItem
  526.     OcxMainForm.MousePointer = 11
  527.     ReciID = ItemX.Key
  528.     ReciNum = Mid$(ReciID, 2)
  529.     nReci = Val(ReciNum)
  530.     MReci1.RecipientNum = nReci
  531.     OcxMainForm.MousePointer = 1
  532.     ' Display Details
  533.     MReci1.Action = ACTION_DETAILS
  534. NoItem:
  535.     OcxMainForm.MousePointer = 1
  536. End Sub
  537. Private Sub SSCommand1_Click()
  538.     If IsActiveSession = True Then
  539.         MMsg2.Action = ACTION_REPLY
  540.         MMsg2.Action = ACTION_SENDMSG
  541.         If MMsg2.ErrorNum <> 0 Then
  542.             MsgBox "Unable to Send Message", 64, "Mail eXtension v1.50"
  543.         End If
  544.     End If
  545. End Sub
  546. Private Sub SSCommand2_Click()
  547.     If IsActiveSession = True Then
  548.         MReci1.Action = ACTION_ADDRESS
  549.         Refresh_Recipient
  550.     End If
  551. End Sub
  552. Private Sub SSCommand3_Click()
  553.     If IsActiveSession = True Then
  554.         MReci1.ResolveName = szResolve
  555.         szResolve = MReci1.ResolveName
  556.     End If
  557. End Sub
  558. Private Sub SSCommand4_Click()
  559.     If IsActiveSession = True Then
  560.         MReci1.Action = ACTION_ADDRECIPIENT
  561.         Refresh_Recipient
  562.     End If
  563. End Sub
  564. Private Sub SSCommand5_Click()
  565.     If IsActiveSession = True Then
  566.         MMsg2.Action = ACTION_NEW
  567.         MMsg2.Action = ACTION_SENDMSG
  568.         If MMsg2.ErrorNum <> 0 Then
  569.             MsgBox "Unable to Send Message", 64, "Mail eXtension v1.50"
  570.         End If
  571.     End If
  572. End Sub
  573. Private Sub SSCommand6_Click()
  574.     If IsActiveSession = True Then
  575.         MMsg2.Action = ACTION_FORWARD
  576.         MMsg2.Action = ACTION_SENDMSG
  577.         If MMsg2.ErrorNum <> 0 Then
  578.             MsgBox "Unable to Send Message", 64, "Mail eXtension v1.50"
  579.         End If
  580.     End If
  581. End Sub
  582. Private Sub Toolbar1_ButtonClick(ByVal Button As Button)
  583.     Dim OpenForms
  584.     Select Case Button.Tag
  585.         Case 1
  586.             LoginMailSystem
  587.             If MSess1.Logon = False Then
  588.                 TreeView1.Nodes.Clear
  589.                 ListView2.ListItems.Clear
  590.             End If
  591.         Case 2
  592.             OcxMainForm.MousePointer = 11
  593.             SSTab1.Tab = 0
  594.             OpenForms = DoEvents()
  595.             If IsActiveSession = True Then Refresh_Inbox
  596.             OcxMainForm.MousePointer = 1
  597.         Case 3
  598.             OcxMainForm.MousePointer = 11
  599.             SSTab1.Tab = 3
  600.             OpenForms = DoEvents()
  601.             OcxMainForm.MousePointer = 1
  602.         Case 4
  603.             OcxMainForm.MousePointer = 11
  604.             SSTab1.Tab = 1
  605.             OpenForms = DoEvents()
  606.             OcxMainForm.MousePointer = 1
  607.         Case 5
  608.             OcxMainForm.MousePointer = 11
  609.             SSTab1.Tab = 2
  610.             OpenForms = DoEvents()
  611.             OcxMainForm.MousePointer = 1
  612.         Case 6
  613.             If IsActiveSession = True Then
  614.                 OcxPassword.Show 1
  615.             End If
  616.     End Select
  617. End Sub
  618. Public Sub UpdateStatusBar()
  619.     If MSess1.Logon = True Then
  620.         StatusBar1.SimpleText = "Mail eXtension: Active Session. Current PostOffice=" + MSess1.POPath
  621.     Else
  622.         StatusBar1.SimpleText = "Mail eXtension Session Closed"
  623.     End If
  624. End Sub
  625. Public Function IsActiveSession() As Boolean
  626.     If MSess1.Logon = True Then
  627.         IsActiveSession = True
  628.     Else
  629.         IsActiveSession = False
  630.         MsgBox "No active Session available", 64, "Mail eXtension Win 95 DEMO 32"
  631.     End If
  632. End Function
  633. Public Sub Refresh_Inbox()
  634.     OcxMainForm.MousePointer = 11
  635.     nMsgCount = MMsg1.MsgCount
  636.     nInbox = nMsgCount
  637.     TreeView1.Nodes.Clear
  638.     If nMsgCount <> 0 Then
  639.         ProgressBar1.Value = 0
  640.         ProgressBar1.Max = nMsgCount
  641.         ' Clear The List View Content
  642.         Dim TreeNode As Node
  643.         Set TreeNode = TreeView1.Nodes.Add(, , "Inbox", "Inbox", 1)
  644.          ' Add the Message List
  645.         MMsg1.Action = ACTION_FINDFIRST
  646.         Do
  647.             If MMsg1.FetchMsg <> 0 Then
  648.                 ProgressBar1.Value = ProgressBar1.Value + 1
  649.                 If MMsg1.UnreadMsg = True Then
  650.                     Set TreeNode = TreeView1.Nodes.Add("Inbox", 4, MMsg1.MsgID, MMsg1.Subject, 3)
  651.                 Else
  652.                     Set TreeNode = TreeView1.Nodes.Add("Inbox", 4, MMsg1.MsgID, MMsg1.Subject, 4)
  653.                 End If
  654.                 MMsg1.Action = ACTION_FINDNEXT
  655.             End If
  656.         Loop While MMsg1.FetchMsg <> 0
  657.         ProgressBar1.Value = 0
  658.     End If
  659.     OcxMainForm.MousePointer = 1
  660. End Sub
  661. Public Sub Refresh_FileList()
  662.     nFileCount = MFile1.FileCount
  663.     szFiles = nFileCount
  664.     ListView2.ListItems.Clear
  665.     If nFileCount <> 0 Then
  666.         ' Add the File List
  667.         For nCurFile = 1 To nFileCount
  668.             MFile1.FileNum = nCurFile
  669.             Dim Item As ListItem
  670.             Set Item = ListView2.ListItems.Add(, , MFile1.filename, 0)
  671.             Item.SubItems(1) = MFile1.FilePath
  672.             Item.SubItems(2) = Str$(nCurFile)
  673.         Next nCurFile
  674.     End If
  675. End Sub
  676. Public Sub LoginMailSystem()
  677.     MSess1.Logon = True
  678.     UpdateStatusBar
  679.     If IsActiveSession = True Then
  680.         SSTab1.Tab = 0
  681.         OpenForms = DoEvents()
  682.         Refresh_Inbox
  683.     End If
  684. End Sub
  685. Public Sub Refresh_Recipient()
  686.     nReciCount = MReci1.RecipientCount
  687.     ListView3.ListItems.Clear
  688.     If nReciCount <> 0 Then
  689.         ' Add the Message List
  690.         For nCurReci = 1 To nReciCount
  691.             MReci1.RecipientNum = nCurReci
  692.             Dim Item As ListItem
  693.             Set Item = ListView3.ListItems.Add(, "R" + Str$(nCurReci), MReci1.RecipientName, 8)
  694.         Next
  695.     End If
  696. End Sub
  697. Private Sub TreeView1_Collapse(ByVal Node As Node)
  698.     If Node.Image = 2 Then
  699.         Node.Image = 1
  700.     End If
  701. End Sub
  702. Private Sub TreeView1_DblClick()
  703.     Dim ItemX As Node
  704.     Dim RootX As Node
  705.     Dim ParentX As Node
  706.     On Error GoTo NoItem
  707.     Set ItemX = TreeView1.SelectedItem
  708.     Set ParentX = ItemX.Parent
  709.     Set RootX = ParentX.Parent
  710.     OcxMainForm.MousePointer = 11
  711.     MMsg2.MsgID = ItemX.Key
  712.     ' Mark Message Image as UNREAD
  713.     If ItemX.Image <> 4 Then ItemX.Image = 4
  714.     If MMsg2.ErrorNum = 0 Then
  715.         szSubject = MMsg2.Subject
  716.         szNoteText = MMsg2.NoteText
  717.         szTime = MMsg2.TimeReceived
  718.         MReci1.FetchType = 0
  719.         MReci1 = MMsg2
  720.         szFrom = MReci1.RecipientName
  721.         MFile1 = MMsg2
  722.         Refresh_FileList
  723.         Refresh_Recipient
  724.         ' Set Current TAB'
  725.         SSTab1.Tab = 3 '
  726.     End If
  727. NoItem:
  728.     OcxMainForm.MousePointer = 1
  729. End Sub
  730. Private Sub TreeView1_Expand(ByVal Node As Node)
  731.     If Node.Image = 1 Then
  732.         Node.Image = 2
  733.     End If
  734. End Sub
  735.